home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / PowerPlant / Everything / CModelessStuff.h < prev    next >
Encoding:
Text File  |  1998-10-11  |  1.8 KB  |  70 lines  |  [TEXT/CWIE]

  1. // CModelessStuff.h -- dialog class
  2.  
  3. #pragma once
  4.  
  5. #include <LGADialog.h>
  6.  
  7. #include "DModelessStuffData.h"
  8.  
  9. class LStream;
  10.  
  11. class CControlPane;
  12. class LTextGroupBox;
  13. class LPopupButton;
  14. class LTextTableView;
  15.  
  16.  
  17. //----------
  18. class CModelessStuff : public LGADialog {
  19. public:    // these comprise the programming interface for using the dialog
  20.     static    CModelessStuff*        CreateModelessStuff        (LCommander*    inSuperCommander,
  21.                                                  CommandT        inCommand,
  22.                                                  DModelessStuffData*        inData);
  23.     virtual void        SetFromData        (DModelessStuffData*        inData);
  24.     virtual DModelessStuffData*        GetData ();
  25.  
  26. // these functions will be obsoleted
  27. // retained only for backwards compatibility
  28.     virtual Boolean        GetToolsChoice();
  29.     virtual void        SetToolsChoice        (Int32        inChoice);
  30.     virtual short        GetFromValuesList2PopupChoice();
  31.     virtual void        SetFromValuesList2PopupChoice        (short        choice);
  32.     virtual short        GetFromMenuPopupChoice();
  33.     virtual void        SetFromMenuPopupChoice        (short        choice);
  34.  
  35.  
  36. public:    // these comprise the implementation
  37.     enum { class_ID = 'Mod9' };
  38.  
  39.                         CModelessStuff        (LStream*    inStream);
  40.     virtual                ~CModelessStuff();
  41.  
  42.     virtual void        ListenToMessage        (MessageT    inMessage,
  43.                                              void        *ioParam);
  44.  
  45.     virtual Boolean        ObeyCommand            (CommandT    inCommand,
  46.                                              void        *ioParam = nil);
  47.     virtual void        FindCommandStatus    (CommandT    inCommand,
  48.                                              Boolean    &outEnabled,
  49.                                              Boolean    &outUsesMark,
  50.                                              Char16        &outMark,
  51.                                              Str255        outName);
  52.  
  53. protected:
  54.     static    void        RegisterClass();
  55.     virtual void        FinishCreateSelf();
  56.     virtual void        DataChanged        (long        inDataID);
  57.  
  58. protected:
  59.     static Boolean        sIsRegistered;
  60.     CommandT            mCommand;
  61.  
  62.     CControlPane*        mToolsPalette;
  63.     LPopupButton*        mFromValuesList2Popup;
  64.     LPopupButton*        mFromMenuPopup;
  65.     LTextTableView*        mTextListTable;
  66.  
  67.     DModelessStuffData*        mData;
  68.  
  69. };
  70.